package com.example.sfm.pojo.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@Schema(name = "用户导出视图", description = "用于导出用户信息的视图对象")
public class UserExportVo {
    @ExcelProperty("用户名")
    @Schema(description = "用户的登录名")
    private String username;

    @ExcelProperty("学号")
    @Schema(description = "用户的学号或工号")
    private String studentId;

    @ExcelProperty("真实姓名")
    @Schema(description = "用户的真实姓名")
    private String fullName;

    @ExcelProperty("邮箱")
    @Schema(description = "用户的电子邮箱")
    private String email;

    @ExcelProperty("手机号")
    @Schema(description = "用户的手机号码")
    private String phone;

    @ExcelProperty("角色")
    @Schema(description = "用户的角色")
    private String roleStr;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ExcelProperty("上次登录时间")
    @Schema(description = "用户上次登录的时间，格式：yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;
}